package priv.yiyuan.example.design.export;

/**
 * 现代主题风格
 * <p>
 * 具体工厂
 */
public class ModernThemeFactory implements ThemeFactory {

    @Override
    public Report createSalesReport() {
        return new SalesReport(createPDFExport());
    }

    @Override
    public ExportFormat createPDFExport() {
        return new PDFExport() {
            @Override
            public String export(String content) {
                return "现代主题 - " + super.export(content) + " (简约设计)";
            }
        };
    }

    @Override
    public Report createInventorReport() {
        return new InventoryReport(createExcelExport());
    }

    @Override
    public ExportFormat createExcelExport() {
        return new ExcelExport() {
            @Override
            public String export(String content) {
                return "现代主题 - " + super.export(content) + " (扁平化风格)";
            }
        };
    }
}
